<h1>New protocol</h1>

<% form_for(@protocol) do |f| %>
  <%= f.error_messages %>

  <p>
    <%= f.label :title %><br />
    <%= f.text_field :title %>
  </p>
  <p>
    <%= f.label :body %><br />
    <%= f.text_area :body %>
  </p>
  <p>
    <%= f.label :status_id %><br />
    <%= f.text_field :status_id %>
  </p>
  <p>
    <%= f.label :type_id %><br />
    <%= f.text_field :type_id %>
  </p>
   <p>
    <%= f.label :user_id %><br />
    <%= select_tag 'protocol[user_id]',
      options_for_select(User.all.collect { |c| [c.name, c.id] },@protocol.user_id) %>
  
  </p>

  <p>
    <%= f.submit 'Create' %>
  </p>
<% end %>

<%= link_to 'Back', protocols_path %>